<template>
  <div>
    <iframe src="http://localhost:5999/#/video" frameborder="0" height="100" width="100"></iframe>
    <button @click="send">send</button>
  </div>
</template>

<script>
// window.addEventListener(
//   "message",
//   (e) => {
//     console.log(e);
//   },
//   false
// );
export default {
  mounted() {},
  methods: {
    send() {
      var iframe = document.getElementsByTagName("iframe")[0].contentWindow;
      iframe.postMessage('hello vue', "*");
    },
  },
};
</script>